package com.iot.ammeter.network.services

import com.iot.ammeter.model.parcelable.*
import com.iot.ammeter.network.DEVICE_INFO_URL
import com.iot.ammeter.network.LAST_MONTH_INFO_URL
import com.iot.ammeter.network.ResponseWrap
import com.iot.ammeter.network.USER_INFO_URL
import retrofit2.Call
import retrofit2.http.GET
import retrofit2.http.Query


interface BaseDataService : RetrofitService {

    @GET(DEVICE_INFO_URL)
    fun getDeviceInfo(@Query("deviceId") deviceId: String): Call<ResponseWrap<DeviceInfo>>

    @GET(USER_INFO_URL)
    fun getUserInfo(@Query("token") token: String): Call<ResponseWrap<UserInfo>>

    @GET(LAST_MONTH_INFO_URL)
    fun getLastMonthInfo(
        @Query("userId") userId: String,
        @Query("deviceId") deviceId: String?
    ): Call<ResponseWrap<LastMonthInfo>>
}